<script setup>
import {useStore} from "vuex";
import {useCookies} from 'vue3-cookies'

const store = useStore()
const {cookies} =useCookies()

function addCar() {
  store.commit("addCar")

}
function setCookie(){
  cookies.set("ts","123456","10s")
}

</script>

<template>
  <div>
    这是新闻页面
  </div>
  <button @click="addCar">点击购物车+1</button>
  <button @click="setCookie">点击设置cookie</button>
</template>

<style scoped>

</style>